package com.bw.documents.manager

import com.bw.documents.manager.entity.*
import kotlinx.coroutines.flow.Flow
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part

interface ApiService {

    //查询文件
    @POST("document/seldocuments")
    fun requestSelDocuments(@Body body: RequestBody):Flow<DocumentsResponseEntity>
    //添加文件
    @POST("document/uploaddocuments")
    fun requestInsertDocuments(@Body body: RequestBody):Flow<InsertDocumentsEntity>
    //上传文件
    @Multipart
    @POST("fileUpload")
    fun requestUploadDocuments(@Part data:List<MultipartBody.Part>):Flow<UploadDocumentsEntity>
    //删除文件
    @POST("document/deldocuments")
    fun requestDelDocuments(@Body body: RequestBody):Flow<DelDocumentsEntity>
    //同步文件
    @POST("document/syncdocuments")
    fun requestSyncDocuments(@Body body: RequestBody):Flow<SyncDocumentsEntity>
}